package com.xjoyt.pay.master.po;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**
 * 商户提现费率
 * 
 * @author ptt
 *
 */

@Entity
@Table(name = "t_merchant_cash_rate")
public class MerchantCashRate {
	
	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "merchant_cash_rate_id", length = 36)
	public String id;
	
	/**
	 * 商户
	 */
	@ManyToOne(targetEntity = Merchant.class, cascade = {})
	@JoinColumn(name = "merchant_id", foreignKey = @ForeignKey(name = "none"))
	// @JsonIgnore
	public Merchant merchant;
	
	/**
	 * 费率(%)
	 */
	@Column(name = "rate")
	public Double rate;

	/**
	 * 固定手续费(分)
	 */
	@Column(name = "money")
	public Long money;

	/**
	 * 上限手续费(分)
	 */
	@Column(name = "`limit`")
	public Long limit;

	/**
	 * 下限手续费(分)
	 */
	@Column(name = "`minimum`")
	public Long minimum;
}
